import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import CurrentItem from './modules/SetSliderItem'
Vue.use(Vuex)

const modules = (r => {
    let obj = {}
    r.keys().forEach(key => {
        let item = r(key)

        for (let k in item) {

            obj[k] = item[k]
        }
    })
    console.log(obj)
    return obj
})(require.context('./', true, /^\.\/modules\/[\s\S]+\.js$/))

const store = new Vuex.Store({
    modules,
    getters
})
window.$$store = store
export default store
